package tote.model;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

/**
 */
@Entity
@Table(name = "tUserBetByGroup")
@IdClass(UserBetByGroupPK.class)
public class UserBetByGroup implements Serializable {
    private static final long serialVersionUID = 2607511733842056964L;

    @Id
    @Column(name = "username", insertable = true, updatable = true)
    private String username;

    @Id
    @Column(name = "teamid", insertable = true, updatable = true)
    private Integer teamid;

    @Column(name = "groupposition")
    private Integer groupposition;

    @Column(name = "totalposition")
    private Integer totalposition;

    @Column(name = "status_")
    private Integer status_;

    @Column(name = "updtime")
    private Timestamp updtime;

    @Column(name = "upduser")
    private String upduser;

    public void setUsername(String username) {
	this.username = username;
    }

    public String getUsername() {
	return username;
    }

    public void setStatus_(Integer status_) {
	this.status_ = status_;
    }

    public Integer getStatus_() {
	return status_;
    }

    public void setUpdtime(Timestamp updtime) {
	this.updtime = updtime;
    }

    public Timestamp getUpdtime() {
	return updtime;
    }

    public void setUpduser(String upduser) {
	this.upduser = upduser;
    }

    public String getUpduser() {
	return upduser;
    }

    public void setTeamid(Integer teamid) {
	this.teamid = teamid;
    }

    public Integer getTeamid() {
	return teamid;
    }

    public void setGroupposition(Integer groupposition) {
	this.groupposition = groupposition == null ? 0 : Math.abs(groupposition);
    }

    public Integer getGroupposition() {
	return groupposition;
    }

    public void setTotalposition(Integer totalposition) {
	this.totalposition = totalposition == null ? 0 : Math.abs(totalposition);
    }

    public Integer getTotalposition() {
	return totalposition;
    }

}
